package otSpaces.util;

import java.io.Serializable;
import java.util.Random;

public class ShortFactory implements Serializable {

	private static final long serialVersionUID = -1625995558367677578L;
	private short _next = (short) (new Random().nextInt() & 0x0000ffff);

	public short next() {
		return _next == Short.MAX_VALUE ? _next = Short.MIN_VALUE : ++_next;
	}
}
